| id | imps79 | imps79b | imps79o | tx | week |
|---|---|---|---|---|---|
| 1103 | 5.5 | 1 | 4 | 1 | 0 |
| 1103 | 3.0 | 0 | 2 | 1 | 1 |
| 1103 | 2.5 | 0 | 2 | 1 | 3 |
| 1103 | 4.0 | 1 | 2 | 1 | 6 |
| 1104 | 6.0 | 1 | 4 | 1 | 0 |
| 1104 | 3.0 | 0 | 2 | 1 | 1 |
| 1104 | 1.5 | 0 | 1 | 1 | 3 |
| 1104 | 2.5 | 0 | 2 | 1 | 6 |
| 1105 | 4.0 | 1 | 2 | 1 | 0 |
| 1105 | 3.0 | 0 | 2 | 1 | 1 |
| 1105 | 1.0 | 0 | 1 | 1 | 3 |
| 1105 | NA | NA | NA | 1 | 6 |
id: ID variableimps79: Continuous measure of schizophrenia (1 to 7)imps79b: Binary measure of schizophrenia (3.5+)imps79o: Ordinal measure of schizophrenia (Cuts: 2.5+, 4.5+, 5.5+)tx: Placebo (0) or treatment (1)week: Week of study (0, 1, 3, 6)| id | imps79 | imps79b | imps79o | tx | week |
|---|---|---|---|---|---|
| 1103 | 5.5 | 1 | 4 | 1 | 0 |
| 1103 | 3.0 | 0 | 2 | 1 | 1 |
| 1103 | 2.5 | 0 | 2 | 1 | 3 |
| 1103 | 4.0 | 1 | 2 | 1 | 6 |
| 1104 | 6.0 | 1 | 4 | 1 | 0 |
| 1104 | 3.0 | 0 | 2 | 1 | 1 |
| 1104 | 1.5 | 0 | 1 | 1 | 3 |
| 1104 | 2.5 | 0 | 2 | 1 | 6 |
| 1105 | 4.0 | 1 | 2 | 1 | 0 |
| 1105 | 3.0 | 0 | 2 | 1 | 1 |
| 1105 | 1.0 | 0 | 1 | 1 | 3 |
| 1105 | NA | NA | NA | 1 | 6 |
Call:
geeglm(formula = imps79b ~ 1 + week, family = binomial("logit"),
data = schizx1, id = schizx1$id, corstr = "unstructured")
Coefficients:
Estimate Std.err Wald Pr(>|W|)
(Intercept) 2.59459 0.11876 477.3 <0.0000000000000002 ***
week -0.45017 0.02767 264.7 <0.0000000000000002 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation structure = unstructured
Estimated Scale Parameters:
Estimate Std.err
(Intercept) 0.9646 0.1007
Link = identity
Estimated Correlation Parameters:
Estimate Std.err
alpha.1:2 0.05390 0.05343
alpha.1:3 -0.02855 0.03265
alpha.1:4 -0.01890 0.03342
alpha.2:3 0.56341 0.10114
alpha.2:4 0.15242 0.06617
alpha.3:4 0.51550 0.07964
Number of clusters: 437 Maximum cluster size: 4
\[ln\left(\frac{\hat{p}}{1-\hat{p}}\right) = b_0 + b_1 (week) = 2.59 - 0.45 (week)\]
week as a non-repeated measures predictor
imps79b) is multiplied by 0.64\[ln\left(\frac{\hat{p}}{1-\hat{p}}\right) = b_0 + b_1 (week) = 2.59 - 0.45 (week)\]
week as a non-repeated measures predictor
| week | prob |
|---|---|
| 0 | 0.93 |
| 1 | 0.89 |
| 3 | 0.78 |
| 6 | 0.47 |
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula: imps79b ~ 1 + week + (1 + week | id)
Data: schizx1
AIC BIC logLik deviance df.resid
1291.6 1318.4 -640.8 1281.6 1564
Scaled residuals:
Min 1Q Median 3Q Max
-2.8446 0.0898 0.1139 0.2646 1.0822
Random effects:
Groups Name Variance Std.Dev. Corr
id (Intercept) 4.413 2.101
week 0.711 0.843 -0.13
Number of obs: 1569, groups: id, 437
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 4.386 0.539 8.14 0.00000000000000041 ***
week -0.793 0.118 -6.71 0.00000000001954283 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr)
week -0.817
\[ln\left(\frac{\hat{p}}{1-\hat{p}}\right) = b_0 + b_1 (week) = 4.39 - 0.79 (week)\]
imps79b) is multiplied by 0.45\[ln\left(\frac{\hat{p}}{1-\hat{p}}\right) = b_0 + b_1 (week) = 4.39 - 0.79 (week)\]
| week | prob |
|---|---|
| 0 | 0.99 |
| 1 | 0.97 |
| 3 | 0.88 |
| 6 | 0.41 |
tx and weekThe maximum of the log likelihood function is found at \(\mu\) = 15.4
genlinmixed
glimmix (but likelihood approximation too)glmer() function in lme4 package
Two predictors: week (L1: Observation) and tx (L2: Person)
Level 1: Within-person equation
Level 2: Between-person equation
week (L1: Observation) and tx (L2: Person)
L1pred), which is centered within cluster (person)Curran, P. J., & Bauer, D. J. (2011). The disaggregation of within-person and between-person effects in longitudinal models of change. Annual review of psychology, 62, 583–619.
Enders, C. K., & Tofighi, D. (2007). Centering predictor variables in cross-sectional multilevel models: a new look at an old issue. Psychological methods, 12(2), 121.
Hamaker, E. L., & Muthén, B. (2020). The fixed versus random effects debate and how it relates to centering in multilevel modeling. Psychological methods, 25(3), 365.
Hayes, T. B. (under review). Individual-Level Probabilities and Cluster-Level Proportions: Toward Interpretable Level- 2 Estimates in Unconflated Multilevel Models for Binary and Ordinal Outcomes.
Hoffman, L. (2019). On the interpretation of parameters in multivariate multilevel models across different combinations of model specification and estimation. Advances in methods and practices in psychological science, 2(3), 288-311.
Rights, J. D., Preacher, K. J., & Cole, D. A. (2020). The danger of conflating level‐specific effects of control variables when primary interest lies in level‐2 effects. British Journal of Mathematical and Statistical Psychology, 73, 194-211.
West, S. G., Ryu, E., Kwok, O. M., & Cham, H. (2011). Multilevel modeling: Current and future applications in personality research. Journal of personality, 79(1), 2-50.
Yaremych, H. E., Preacher, K. J., & Hedeker, D. (2021). Centering categorical predictors in multilevel models: Best practices and interpretation. Psychological Methods.